﻿@model IEnumerable<tutors_clus.Models.message>

@{
    ViewBag.Title = "Messega_Of_Course";
    Layout = "~/Views/Shared/_Layout_Private.cshtml";
}
<div id="cleft">
    <div class="menu_private">
        <h3>@Model.Select(m=>m.course.name_cou).FirstOrDefault()</h3>
    <ul>
        <li>@Html.ActionLink("Mục thảo luận", "Comment_Of_Course", new { id_course=@Model.Select(m=>m.id_cou).FirstOrDefault()})</li>
        <li>@Html.ActionLink("Tin nhắn","Message_Of_Course",new { id_course=@Model.Select(m=>m.id_cou).FirstOrDefault()})</li>
    </ul>
</div>
</div>
<div id="cright">

    <div class="content_i">
        <h2>Tin nhắn của bạn</h2>
        @foreach (var item in Model)
        {
            <div class="messega">
                <div class="top">
                    @Html.ActionLink(@item.title_mes, "Message_Detail", new { id_course = @item.id_cou,id_mes = @item.id_mes})
                    <span>@item.student.fullname_stu</span>
                </div>
                <div class="main">
                    @if (item.content_mes.Length<200)
	                {
		                @MvcHtmlString.Create(@item.content_mes)
	                }else{
                        @MvcHtmlString.Create(@item.content_mes.Substring(0,200))
                    }

                </div>
                <hr />
            </div>
        }
    </div>
</div>
